package com.hshoesmall.demo.service.lmpl;

import com.hshoesmall.demo.mapper.ColorMapper;
import com.hshoesmall.demo.model.entity.Color;
import com.hshoesmall.demo.service.ColorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service(value = "ColorService")
@Transactional(rollbackFor = Exception.class)
public class ShoesColorlmpl implements ColorService {
    @Resource
    ColorMapper colorMapper;

    @Override
    public List<Color> findColorList() {

        List<Color> color = colorMapper.findAllColor();
        return color;
    }
}
